package com.blog.wl2023.repository;

import com.blog.wl2023.entity.Type;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.transaction.annotation.Transactional;

public interface TypeRepository extends JpaRepository<Type, Long> , JpaSpecificationExecutor<Type> {


	@Modifying
	@Transactional
	@Query("update Type a set a.typeName=:typeName,a.typeInfo=:typeInfo,a.keyOne=:keyOne where a.uuid = :uuid")
	void updateType(String uuid, String typeName, String typeInfo, String keyOne);
}
